﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ServiceModel;
using AirLine.Entities;
using AirLine.WebApp.AirLineServiceReference;
using AirLine.WebApp.Models;

namespace AirLine.WebApp.Controllers
{
    public class BookController : Controller
    {
        AirLineServiceClient _serviceClient = new AirLineServiceClient();        

        public ActionResult Index()
        {
            var model = _serviceClient.GetAllSeatClass();
            return View(model);
        }

        public ActionResult FareFamilyDescription()
        {
            var model = _serviceClient.GetAllTicketClass();
            return View(model);
        }
        [HttpPost]
        public ActionResult SearchFlight(SearchFlight searchFlight)
        {
            var model = _serviceClient.SearchFlight(searchFlight);
            return PartialView("_SearchFlight",model);
        }

    }
}
